package at.prisma;

public class Stats {
  private float sum=0;
  private float count=0;
  public void add(float num){
    ++count;
    sum+=num;
  }

  public float average(){
    return sum/count;
  }

  /* return sum of values*/
  public float sum(){
    return sum;
  }

  public static void main(String[] args){
    Stats s = new Stats();
    s.add(5);
    s.add(7);
    System.out.println( s.average());
  }
}
